<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE>
<html>
<head>
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/layout.css" />
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/module_public.css" />
  <script type="text/javascript" src="__PUBLIC__/Js/jquery.js"></script>
  <script type="text/javascript" src="__PUBLIC__/Js/My97DatePicker/WdatePicker.js"></script>
  <script type="text/javascript" src="__PUBLIC__/Js/system.js"></script>
</head>
<body>
  <div class="module_public">
     <div class="module_public_content">
        <h1> >> OA用户管理 <a href="__ACTION__">【刷新】</a></h1>
     </div>
     <div class="module_public_main">
       <table>
          <tr>
            <td colspan="2" bgcolor="#F0F0F0"><a href="__URL__/OA_user_add">【创建用户】</a><a href="__URL__/OA_user_manage">【管理用户】</a></td>
          </tr>
          <tr>
            <td align="center">编号</td>
            <td align="center">用户姓名</td>
            <td align="center">是否允许登入OA</td>
            <td align="center">外部邮件服务</td>
            <td align="center">权限控制</td>
            <td align="center">自由办公桌</td>
            <td align="center">操作</td>
          </tr>
          <?php if(is_array($e_info)): $k = 0; $__LIST__ = $e_info;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($k % 2 );++$k;?><tr>
            <td align="center"><?php echo ($k); ?></td>
            <td align="center"><?php echo ($v["u_name"]); ?></td>
            <?php if($v["u_enable"] == '1'): ?><td align="center"><font color=green>开启</font></td>
            <?php else: ?>
            <td align="center"><font color=red>禁用</font></td><?php endif; ?>
            <?php if($v["email_config"] == '1'): ?><td align="center"><font color=green>已配置</font>&nbsp;<a href="__URL__/OA_edit_emailconfig/u_id/<?php echo ($v["u_id"]); ?>/uname/<?php echo ($v["u_name"]); ?>">【更改配置】</a></td>
            <?php else: ?>
            <td align="center"><font color=red>未配置</font></td><?php endif; ?>
            
            <?php if($v["permissions"] == '1'): ?><td align="center"><font color=green>已生成</font></td>
            <?php else: ?>
            <td align="center"><font color=red>未生成</font></td><?php endif; ?>
            
            <?php if($v["absolute"] == '1'): ?><td align="center"><font color=green>已生成</font></td>
            <?php else: ?>
            <td align="center"><font color=red>未生成</font></td><?php endif; ?>
            <td align="center">
               <a href="__URL__/OA_config_mail/uid/<?php echo ($v["u_id"]); ?>/uname/<?php echo ($v["u_name"]); ?>">创建外部邮件服务配置</a> |
               <?php if($v["permissions"] == '1'): ?><a href="#" onclick="alert('已生成权限控制完成,不能重复操作');">生成权限控制</a> |
               <?php else: ?>
               <a href="__APP__/Permissions/add_permissions/uid/<?php echo ($v["u_id"]); ?>/uname/<?php echo ($v["u_name"]); ?>">生成权限控制</a> |<?php endif; ?>
               
               <?php if($v["absolute"] == '1'): ?><a href="#" onclick="alert('已生成自由办公桌功能,不能重复操作');">开启自由办公桌功能</a> |
               <?php else: ?>
               <a href="__URL__/add_absolute/uid/<?php echo ($v["u_id"]); ?>/uname/<?php echo ($v["u_name"]); ?>">开启自由办公桌功能</a> |<?php endif; ?>
               
               <a href="__URL__/OA_edit_user/uid/<?php echo ($v["u_id"]); ?>">修改信息</a> |
               <a href="__URL__/do_del_user/uid/<?php echo ($v["u_id"]); ?>" onclick="confirm('确定要删除用户吗?删除用户也会删除用户的其它配置信息.');">删除用户</a>
            </td>
          </tr><?php endforeach; endif; else: echo "" ;endif; ?>
       </table>
     </div>
  </div>
</body>
</html>